The present invention relates generally to microprocessor architectures, and more particularly to, a content addressable memory (CAM) that is routed as a functional unit within the microprocessor architecture.
In the integrated circuit (IC) industry and communications industry, content addressable memories (CAMs) are widely used in many different applications. Content addressable memories are commonly used in data routing systems (e.g., such as in switches and routers) to look up addresses of the packets that flow through the switches and to quickly, correlate incoming data addresses to communication channel outputs so that data is quickly routed through telecom systems. This includes MAC address lookup for Ethernet switching, ATM VPI/VCI lookup for ATM switches and IP address lookup in routers. CAMs are also used for classification of packets. CAMs can also find use in other diverse applications such as pattern matching, voice recognition, data compression, branch target address cache or MMUs inside a microprocessor, etc. In these common applications, one of two prior art content addressable memory (CAM) architectures have generally been used.
A first content addressable memory (CAM) architecture is referred to as the binary CAM. The binary CAM stores different N bit tags in many different rows of memory in the CAM. During operation, the CAM is provided with N bit compare values and compares these N bit compare values with the N bit tags in order to determine if there is a match in the CAM. In order for a hit or match to occur in the CAM, every bit in the N bit tag must match an associated bit within the same bit position of the N bit data value. Due to the requirement of an exact match at each and every bit location, industry use of binary CAMs can be limited in many applications. For example, in the communications industry, use of binary CAMs can be problematic for routing in higher layers (e.g., layers 3-7) of the ISO 7-layer reference model. In addition, conventional binary CAMs can only process tag values of the same size (e.g., all are 32 bit) and all rows in the CAM must contain the same type of data. For example, a single conventional binary CAM cannot contain both Ethernet and IPv4 routing data.
A second type of CAM utilized in current telecom systems is referred to as a ternary CAM. IP address lookup typically requires the use of a ternary CAM since certain fields of the addresses are masked. In a ternary CAM, N bit tags that are stored within the CAM may be compared against input values that have been masked by a mask value. The mask value creates xe2x80x9cdon""t carexe2x80x9d bits within the compare value so that a hit can occur in the ternary CAM even when only some of the tag bits stored with the ternary CAM match the input compare value. Due to this xe2x80x9cdon""t carexe2x80x9d flexibility, ternary CAMs generally have more diverse and numerous application possibilities than binary CAMs, and are more likely to be used in applications pertaining to higher layers (e.g., layers 3-7) of the ISO 7-layer reference model. However all ternary CAMs to date still only store tag data limited to certain predetermined sizes, and these ternary CAMs can only store data of a single data type in a manner similar to the binary CAM.
In current voice and data transmission systems, many different layers of protocol are woven together in order to enable communication from a source to a destination. For example, Ethernet, ATM, FDDI, ISDN, token ring, firewire, TCP/IP, HTTP, TDP, RTI. TELNET, MPLS, wireless, and many other protocols, technology, or standards may be used to transfer information from one location to another location. Each of these different mechanisms or protocols require CAM matching of different sizes of data (e.g., Ethernet has 48 bit addresses, IPv6 has 128 bit addresses, IPv4 has 32 bit addresses, some classification processes use hundreds of bits. etc.). In addition, these different mechanisms or protocols require different types of data that may need to be handled in different manners or uniquely identified in certain applications. Therefore, in the past, separate CAM circuitry had to be provided for each different protocol used within a data and/or voice router. This need for multiple CAMs increased costs reduced speed of processing, and/or adversely increased the IC area of the router solution where printed circuit board footprints increased.
Therefore, a need exists in the industry for a CAM that can process data quantities of different sizes as well as data quantities of different types within the same physical CAM in an efficient and effective manner.